package com.br.pfm.persistence.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import lombok.Getter;
import lombok.Setter;

@Entity
@Table(name="PFM_categoria")
public class Categoria implements Serializable {
	
	private static final long serialVersionUID = 4484184550613937537L;
	
	@Id
	@GeneratedValue
	@Column(name = "id_categoria", nullable = false, length = 2)
	private int idCategoria;
	
	@Getter
    @Setter
	@Column(name = "nm_categoria", nullable = false, length = 30)
	private String nomeCategoria;
	
	@Getter
    @Setter
	@Column(name = "desc_categoria", nullable = true)
	private String descCategoria;
	
	@OneToOne(mappedBy = "categoria")
    private ItemFatura itemFatura;

}
